<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
 //如何在数组的开头添加一个元素，最后添加一个
 var arr=['a','b','c'];
 arr.unshift('start');
 arr.push('end');
 //es6扩展运算符  扩展运算符(…)用于取出参数对象中的所有可遍历属性，拷贝到当前对象之中
 var arr1=[1,2,3];
 arr1=['start',...arr1,'end'];
 console.log(arr1);
 console.log(arr);
    </script>
</body>
</html>